<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/common/taglibs.jsp"%>
<%--@elvariable id="handler" type="com.youtills.core.app.dev.RandomRequestHandler"--%>

<div id="base64">
    <h2>Random Generator</h2>
    <form method="post" action="random">
        <div>
            <label>Random Type:</label>
            <input type="radio" name="type" value="bytes" ${handler.type == 'bytes' ? 'checked="checked"' : ''}/>Bytes(Base64 encode to convert it to String)
            &nbsp;<input type="radio" name="type" value="string" ${handler.type == 'string' ? 'checked="checked"' : ''}/>String
        </div>
        <div><label for="length">Length:</label>
            <input id="length" type="number" name="length" value="${handler.length}" maxlength="5">(1 - 99999)
        </div>
        <div>
            <input type="submit" name="action" value="Generate">
        </div>
        <c:if test="${!empty handler.result}">
            <div id="output">Output: </div>
            <textarea class="pre" style="height:191px;width:700px;" readonly="readonly">${handler.result}</textarea>
        </c:if>

    </form>
</div>